/**
 * Company : Thai Informatic System Co., Ltd.
 * Created By : Dr.Tree
 * Created On : Jun 27, 2012  11:51:55 PM 
 * e-Mail : chatree@tis.co.th
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : jpa.entitys.synchro.staging.logs
 * File Name : VwUserColumnPk.java
 * TODO
 */
package jpa.entitys.synchro.staging.logs;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * @author chatree
 *
 */
@Embeddable
public class VwUserColumnPk implements Serializable {

	private static final long serialVersionUID = 1L;

	@Column(name="TABLE_NAME")
	private String tableName;
	
	@Column(name="COLUMN_NAME")
	private String columnName;

	/**
	 * @return the tableName
	 */
	public String getTableName() {
		return tableName;
	}

	/**
	 * @param tableName the tableName to set
	 */
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	/**
	 * @return the columnName
	 */
	public String getColumnName() {
		return columnName;
	}

	/**
	 * @param columnName the columnName to set
	 */
	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}
	
	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof VwUserColumnPk)) {
			return false;
		}
		VwUserColumnPk castOther = (VwUserColumnPk)other;
		return 
			this.tableName.equals(castOther.tableName)
			&& this.columnName.equals(castOther.columnName);	

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.tableName.hashCode();
		hash = hash * prime + this.columnName.hashCode();
		
		return hash;
    }
	
}
